//
//  MYQuestionCell.m
//  投融保
//
//  Created by 523 on 13-12-19.
//  Copyright (c) 2013年 木叶科技. All rights reserved.
//

#import "MYQuestionCell.h"

@implementation MYQuestionCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        //问题列表视图
        //    CGSize resendSize=[str sizeWithFont:[UIFont systemFontOfSize:13] constrainedToSize:CGSizeMake(180, 100) lineBreakMode:NSLineBreakByCharWrapping];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setValueWithQuestionId:(NSString *)aQuestionId question:(NSString *)aQuestion answer:(NSString *)aAnswer
{
    CGSize questionSize=[aQuestion sizeWithFont:[UIFont systemFontOfSize:24] constrainedToSize:CGSizeMake(260, 300) lineBreakMode:NSLineBreakByCharWrapping];
    CGSize answerSize=[aQuestion sizeWithFont:[UIFont systemFontOfSize:24] constrainedToSize:CGSizeMake(260, 300) lineBreakMode:NSLineBreakByCharWrapping];
    
//    [self setFrame:CGRectMake(0, 0, 320, (answerSize.height+questionSize.height+24))];
    
    
    [self.lblQuestion setFrame:CGRectMake(250, 20, 260, questionSize.height)];
    [self.lblAnswer setFrame:CGRectMake(250, (80+questionSize.height), 260, answerSize.height)];
    
    self.questionId.text=aQuestion;
    [self.questionId setFont:[UIFont systemFontOfSize:24]];
    self.lblQuestion.text=aQuestion;
    [self.lblQuestion setFont:[UIFont systemFontOfSize:24]];
    self.lblAnswer.text=aAnswer;
    [self.lblAnswer setFont:[UIFont systemFontOfSize:24]];
    
}


@end
